package com.macro.mall.ums.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

/**
 * 会员登录记录
 *
 * @author xuyanjun
 * @date 2019-12-09
 */
@Getter
@Setter
@ToString
@Accessors(chain = true)
@TableName("ums_member_login_log")
public class MemberLoginLogEntity {

    /**
     * id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private LocalDateTime createTime;

    /**
     * 会员id
     */
    @TableField(value = "member_id")
    private Long memberId;

    /**
     * ip
     */
    @TableField(value = "ip")
    private String ip;

    /**
     * 省
     */
    @TableField(value = "province")
    private String province;

    /**
     * 市
     */
    @TableField(value = "city")
    private String city;

    /**
     * 登录类型：0->PC；1->android;2->ios;3->小程序
     */
    @TableField(value = "login_type")
    private Integer loginType;

    /**
     * 用户来源
     */
    @TableField(value = "source_type")
    private Integer sourceType;

    /**
     * 用户代理
     */
    @TableField(value = "agent")
    private String agent;

}